package com.monolithiot.cdn.management.common.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 2018/11/18 Create by 郭文梁
 * User
 * 用户实体类
 *
 * @author 郭文梁
 * @date 2018/11/18
 */
@Data
@Table(name = "user")
public class User {
    /**
     * 用户ID
     * id       INT(10)      NOT NULL AUTO_INCREMENT,
     */
    @Id
    @Column(name = "id", nullable = false, length = 10)
    @GeneratedValue(generator = "JDBC")
    private Integer id;
    /**
     * 用户名
     * name     VARCHAR(100) NOT NULL,
     */
    @Column(name = "name", nullable = false, length = 100)
    private String name;
    /**
     * 密码(MD5)
     * password VARCHAR(255) NOT NULL,
     */
    @Column(name = "password", nullable = false)
    private String password;
    /**
     * 角色
     * role     INT(2)       NULL,
     */
    @Column(name = "role", length = 2)
    private Integer role;
}
